xentrace: handle sparse cpu ids correctly in xen trace buffer handling
authorJuergen Gross <jgross@suse.com>
Thu, 4 Oct 2018 11:47:24 +0000 (12:47 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Thu, 4 Oct 2018 11:47:24 +0000 (12:47 +0100)
commit74584a367051bc0d6f4b96fd360fa7bc6538fc39
tree316bd7c12dff01c1bd4e8917608e31aa325dc0ab
parent28a936790c16d3c6ae9a43cd59b57d52c36dc7b4
xentrace: handle sparse cpu ids correctly in xen trace buffer handling

The per-cpu buffers for Xentrace are addressed by cpu-id, but the info
array for the buffers is sized only by number of online cpus. This
might lead to crashes when using Xentrace with smt=0.

The t_info structure has to be sized based on nr_cpu_ids.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
tools/xentrace/xentrace.c
xen/common/trace.c